#include <bits/stdc++.h>
using namespace std;
#define int long long
void solve()
{
    int n,x,y;
    cin>>n>>x>>y;
    vector<int>v(n+1,-1);
    for(int i=y;i<=x;i++)
    {
        v[i]=1;
    }
    for(int i=y-1;i>=1;i--)
    {
        if((i+1-(y-1))%2)v[i]=-1;
        else v[i]=1;
    }
    for(int i=x+1;i<=n;i++)
    {
        if((i+1-(x+1))%2)v[i]=-1;
        else v[i]=1;
    }
    for(int i=1;i<=n;i++)
    {
        cout<<v[i]<<" ";
    }
    cout<<endl;
}
signed main()
{
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int T=1;
    cin>>T;
    while(T--)
    {
       solve();
    }
    return 0;
}